<?php

echo 3.5.'=>'.round(3.5);  //四舍五入
echo PHP;
die;

function readTxt()
{
    # code...
    $handle = fopen("./test.txt", 'rb');

    $arr = [];
    while (feof($handle)===false) {
        # code...
        //yield fgets($handle);
        $arr[] = fgets($handle);
    }

    fclose($handle);

    return $arr;
}

foreach (readTxt() as $key => $value) {
    # code...
    sleep(1);
    echo $value.'<br />';
}
